<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false"%>
<%@ include file="/common/backcommon.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>Breaking Fast</title>
		<script type="text/javascript">
			$(function() {
				$.ajax({
					url: "${base}/backUserCtl/selectCountry",
					type: "post",
					success: function(result){
						var country = $("#countryid");
						for(var i = 0; i < result.length; i++) {
						var selected = "${user.countryid}" == result[i].countryid ? "selected" : "";
							country.append("<option value='" + result[i].countryid + "' " + selected  +" >" + result[i].zhname + "</option>");
						}
					}
				});
			});
		</script>
	</head>
	<body>
		<div class="cms_right">
		  	<div class="cms_title">
		    	<span>用户管理：详情 </span>
		    </div>
		    <div class="cms_search">
		    	<form:form id="addForm" commandName="user" action="${base}/backUserCtl/add" method="post">
					<table width="1000" border="0" class="search_bd">
			          	<tr>
				            <td class="yh_name">email：</td>
				            <td class="yh_bd"><input type="text" class="cms_text02" value="${user.email}" readonly/></td>
				            <td class="tishi"></td>
				            <td class="yh_name">用户名：</td>
				            <td class="yh_bd"><input type="text" class="cms_text02"value="${user.username}" readonly/></td>
				            <td class="tishi"></td>
			          	</tr>
			          	<tr>
				            <td class="yh_name">性别：</td>
				            <td class="yh_bd">
					            <select class="cms_text02" disabled>
					            	<option value="" selected="selected">=请选择=</option>
					            	<option value="1" ${1 == user.sex ? "selected" : ""}>男</option>
					            	<option value="0" ${0 == user.sex ? "selected" : ""}>女</option>
					            </select>
				            </td>
				            <td class="tishi"><div id="sexTip" ></div></td>
				            <td class="yh_name">国家：</td>
				            <td class="yh_bd">
					            <select id="countryid" class="cms_text02" disabled>
					            	<option value="" selected="selected">=请选择=</option>
					            </select>
							</td>
				            <td class="tishi"></td>
			          	</tr>
			          	<tr>
				            <td class="yh_name">手机号码：</td>
				            <td class="yh_bd"><input type="text" class="cms_text02" value="${user.phone}" readonly/></td>
				            <td class="tishi"></td>
				            <td class="yh_name">用户类型：</td>
				            <td class="yh_bd">
					            <select class="cms_text02" disabled>
					            	<option value="" selected="selected">=请选择=</option>
					            	<option value="0" ${0 == user.type ? "selected" : ""}>前台用户</option>
					            	<option value="1" ${1 == user.type ? "selected" : ""}>后台用户</option>
					            </select>
				            </td>
				            <td class="tishi"></td>
			          	</tr>
			          	<tr>
				            <td class="yh_name">地址：</td>
				            <td class="yh_bd" colspan="4"><input type="text" class="cms_text02" style="width:650px" value="${user.address}" readonly/></td>
				            <td class="tishi"></td>
			          	</tr>
			          	<tr>
				            <td>&nbsp;</td>
				            <td></td>
				            <td align="center"><input type="button" class="search_btn" onclick="location.href='${base}/background/user/userlist.jsp'" value="返回" /></td>
				            <td></td>
				            <td>&nbsp;</td>
				            <td>&nbsp;</td>
						</tr>
					</table>
				</form:form>
			</div>
		</div>
	</body>
</html>
	